import request from '@/utils/request';
import { ProductAttributeCategory } from '@/models/productAttributeCategory';

const prefix = '/products/attributes/categories';

export async function list(): Promise<any> {
  return request(prefix);
}

export async function add(payload: ProductAttributeCategory): Promise<any> {
  return request(prefix, {
    method: 'POST',
    data: payload,
  });
}

export async function remove(id: number): Promise<any> {
  return request(`${prefix}/${id}`, {
    method: 'DELETE',
  });
}
